Skip to content

Fix aspire config list --all showing no features when no config exists#15821

Open
Copilot wants to merge 2 commits intomainfrom
copilot/fix-config-list-all-error
Open

Fix aspire config list --all showing no features when no config exists#15821
Copilot wants to merge 2 commits intomainfrom
copilot/fix-config-list-all-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 2, 2026

aspire config list --all with a fresh install (no config set) would hit an early-return path and only print "No configuration values found." — never displaying available feature flags. Similarly, aspire config list gave no hint to try --all.

Changes

  • ConfigCommand.csListCommand.ExecuteAsync: Replace the unconditional early-return on empty config with flag-aware branching:
    • config list (no --all, no config): show "No configuration values found." + hint to run --all, then return
    • config list --all (no config): show "No configuration values found." then fall through to display all feature flags with defaults/descriptions
    • Existing config present: behavior unchanged — render config tables then feature section
  • ConfigCommandTests.cs: Two new tests covering the no-config cases for both with and without --all

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dnceng.pkgs.visualstudio.com
    • Triggering command: /usr/share/dotnet/dotnet dotnet test tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj -- --filter-method *.ConfigListCommand_WithoutAllFlag_ShowsHintInsteadOfFeatures --filter-method *.ConfigListCommand_WithAllFlag_ShowsFeatureDetails --filter-method *.ConfigListCommand_WithoutAllFlag_NoConfig_ShowsHintAboutAllFlag --filter-method *.ConfigListCommand_WithAllFlag_NoConfig_ShowsAvailableFeatures --filter-not-trait quarantined=true --filter-not-trait outerloop=true (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Agent-Logs-Url: https://github.com/microsoft/aspire/sessions/56df1d59-b00d-43c5-ad6e-a501718d413c

Co-authored-by: maddymontaquila <12660687+maddymontaquila@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix config list --all behavior for empty configuration Fix aspire config list --all showing no features when no config exists Apr 2, 2026
Copilot AI requested a review from maddymontaquila April 2, 2026 23:02
@maddymontaquila maddymontaquila marked this pull request as ready for review April 2, 2026 23:42
Copilot AI review requested due to automatic review settings April 2, 2026 23:42
@maddymontaquila
Copy link
Copy Markdown
Contributor

@davidfowl try this when youre home

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes aspire config list --all so that it still displays the available feature flags (with defaults/descriptions) even on a fresh install where no local/global config files exist, and improves the config list no-config UX by adding a hint to use --all.

Changes:

  • Adjust config list control flow to avoid an unconditional early return when both local/global config are empty, while still keeping the “no config” message.
  • Add a --all hint in the no-config + no---all case, and allow --all to fall through to the feature listing.
  • Add unit tests covering both no-config scenarios (config list and config list --all).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Aspire.Cli/Commands/ConfigCommand.cs Makes the empty-config path --all-aware so features are still displayed when requested.
tests/Aspire.Cli.Tests/Commands/ConfigCommandTests.cs Adds test coverage for the new no-config behavior with/without --all.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15821

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15821"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

config list --all doesn't work if there is no config at all set

3 participants